export const mixin = {
  data () {
    return{

    }
  },
  methods: {
    photoHttp2Https (url) {
      if (url && url.length) {
        let reg = /(http):\/\/S*/gi
        if (url.match(reg)) {
          return url.replace(reg, 'https://')
        } else {
          return url
        }
      } else {
        return ''
      }
    },
    dataCollect (op, page, msg) {
      window.WebViewJavascriptBridge && window.WebViewJavascriptBridge.callHandler('collectMsg2App', {
        op: op,
        page: page,
        msg: this.$store.state.deviceEnvironment == 'ios' ? msg : JSON.stringify(msg)
      })
    }
  }
}